﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ArtistTypes.aspx.cs" Inherits="ImgForecast.admin.ArtistTypes" %>

<%@ Register Assembly="obout_Grid_NET" Namespace="Obout.Grid" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Artists Types</h1>
    <cc1:Grid ID="Grid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
        CallbackMode="true" Serialize="true" AllowAddingRecords="true">
        <Columns>
            <cc1:Column ID="Column1" DataField="ArtistTypeID" Visible="false" ReadOnly="true"
                HeaderText="Artist Type ID" Width="100" runat="server" />
            <cc1:Column ID="Column2" DataField="Name" HeaderText="Name" Width="500" runat="server" />
            <cc1:Column ID="Column3" HeaderText="Edit" AllowEdit="true" AllowDelete="true" Width="125"
                runat="server" />
        </Columns>
    </cc1:Grid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
        DeleteCommand="DELETE FROM [ArtistType] WHERE [ArtistTypeID] = @ArtistTypeID"
        InsertCommand="INSERT INTO [ArtistType] ([Name]) VALUES (@Name)" SelectCommand="SELECT [Name], [ArtistTypeID] FROM [ArtistType] ORDER BY [Name]"
        UpdateCommand="UPDATE [ArtistType] SET [Name] = @Name WHERE [ArtistTypeID] = @ArtistTypeID">
        <DeleteParameters>
            <asp:Parameter Name="ArtistTypeID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Name" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="ArtistTypeID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
